;#############################
;命令：
;nasm -f elf64 day0_2print_1puts.asm -o main.o && gcc main.o -o main -lc -no-pie && ./main
;输出：
;Hello, World! This is puts! Ye!1
;Hello, World! This is puts! Ye!1
;Hello, World! This is puts! Ye!3
;Hello, World! This is puts! Ye!4
;The int is 7
;The int is 20
;#############################
extern puts

section .data
	msg1: db "Hello, World! This is puts! Ye!1", 0
	msg3: db "Hello, World! This is puts! Ye!3", 0
	;请注意下面不是单引号'，而是反单引号`
	msg4: db `Hello, World! This is puts! Ye!4`, 0

section .text
	global main

main:
	push rbp
	mov rbp, rsp

;#######################################
	;puts函数只能用于输出字符串
	mov rdi, msg1
	call puts

	lea rdi, [msg1]
	call puts

	mov rdi, msg3
	call puts

	mov rdi, msg4
	call puts

;#######################################

	mov eax, 0
	leave
	ret
